import requests
import requests


cookies = {
    'JSESSIONID': '2B655577D4660F88B7DA4C3BF45E4BC0',
    'tempTokenKey': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLnhormr4UiLCJhdWQiOiI5RTEwNTlDOTMzNUQ0QzdDQjhEQzc0MDBEMDNBRUNGQiIsInNlcnZlciI6bnVsbCwicm9sZSI6IlJPTEVfQVJFQSxST0xFX1dJTkRPVyIsImlzSW5pdGlhbFBhc3N3b3JkIjoiMCIsInJlZ2lvbk5hbWUiOiLotLXlt57nnIEiLCJpbmR1c3RyeSI6bnVsbCwiYXBwQ29kZSI6ImRnb3YtcG9ydGFsIiwib3JnYW5OYW1lIjoi5LqR5LiK6LS15beeIiwicmVnaW9uQ29kZSI6IjUyMDAwMCIsImluZHVzdHJ5TGlzdCI6bnVsbCwib3JnYW5Db2RlIjoiNTIwMDAyIiwiZXhwaXJhdGlvblRpbWUiOjM3LCJncmFkZSI6IjIiLCJzdGF0dXMiOiIxIiwiaXNzIjoiaW5zcHVyIiwiaWF0IjoxNzIxMzUxNTI3LCJleHAiOjE3MjEzODAzMjd9.UXxsKy-FTBv36wh3YP49U4tNIibloo8ye2H_cXjTmQ0HjQdElFtJcdxN_uEm0wYrEcTQNooxTUr4EqRzC-gFZA',
    'userInfoKey': '{^%^22role^%^22:^%^22ROLE_AREA^%^2CROLE_WINDOW^%^22^%^2C^%^22isInitialPassword^%^22:^%^220^%^22^%^2C^%^22regionName^%^22:^%^22^%^E8^%^B4^%^B5^%^E5^%^B7^%^9E^%^E7^%^9C^%^81^%^22^%^2C^%^22appCode^%^22:^%^22dgov-portal^%^22^%^2C^%^22organName^%^22:^%^22^%^E4^%^BA^%^91^%^E4^%^B8^%^8A^%^E8^%^B4^%^B5^%^E5^%^B7^%^9E^%^22^%^2C^%^22regionCode^%^22:^%^22520000^%^22^%^2C^%^22phone^%^22:^%^22384d53fa06a4844cfd54260b048c33e9^%^22^%^2C^%^22organCode^%^22:^%^22520002^%^22^%^2C^%^22expirationTime^%^22:37^%^2C^%^22name^%^22:^%^221342b48e6f8f39ea7ba36accc05b61a8^%^22^%^2C^%^22id^%^22:^%^229E1059C9335D4C7CB8DC7400D03AECFB^%^22^%^2C^%^22email^%^22:^%^22aa67c9bf293c42e9144476195b550c0f^%^22^%^2C^%^22username^%^22:^%^2247d57692a252657367001b6a2ff35333^%^22^%^2C^%^22status^%^22:^%^221^%^22^%^2C^%^22isWeakPwd^%^22:^%^220^%^22}',
    'wyhtml': '/tyspzy/_190c89561fd8b02_1721352151549',
    'pwdState': 'true',
    'inspurRoleKey': 'ROLE_AREA',
    'windowId': '0B7CA12E92004E0ABCA9EB88F0A792E4',
    'James_cookie_sYQDUGqqzHtheme': 'custom',
}

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0',
    'Accept': '*/*',
    'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
    # 'Accept-Encoding': 'gzip, deflate',
    'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
    'X-Requested-With': 'XMLHttpRequest',
    'Origin': 'http://59.215.206.188',
    'Connection': 'keep-alive',
    'Referer': 'http://59.215.206.188/zhslzy/accept/system/window/index',
    # 'Cookie': 'JSESSIONID=2B655577D4660F88B7DA4C3BF45E4BC0; tempTokenKey=eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLnhormr4UiLCJhdWQiOiI5RTEwNTlDOTMzNUQ0QzdDQjhEQzc0MDBEMDNBRUNGQiIsInNlcnZlciI6bnVsbCwicm9sZSI6IlJPTEVfQVJFQSxST0xFX1dJTkRPVyIsImlzSW5pdGlhbFBhc3N3b3JkIjoiMCIsInJlZ2lvbk5hbWUiOiLotLXlt57nnIEiLCJpbmR1c3RyeSI6bnVsbCwiYXBwQ29kZSI6ImRnb3YtcG9ydGFsIiwib3JnYW5OYW1lIjoi5LqR5LiK6LS15beeIiwicmVnaW9uQ29kZSI6IjUyMDAwMCIsImluZHVzdHJ5TGlzdCI6bnVsbCwib3JnYW5Db2RlIjoiNTIwMDAyIiwiZXhwaXJhdGlvblRpbWUiOjM3LCJncmFkZSI6IjIiLCJzdGF0dXMiOiIxIiwiaXNzIjoiaW5zcHVyIiwiaWF0IjoxNzIxMzUxNTI3LCJleHAiOjE3MjEzODAzMjd9.UXxsKy-FTBv36wh3YP49U4tNIibloo8ye2H_cXjTmQ0HjQdElFtJcdxN_uEm0wYrEcTQNooxTUr4EqRzC-gFZA; userInfoKey={^%^22role^%^22:^%^22ROLE_AREA^%^2CROLE_WINDOW^%^22^%^2C^%^22isInitialPassword^%^22:^%^220^%^22^%^2C^%^22regionName^%^22:^%^22^%^E8^%^B4^%^B5^%^E5^%^B7^%^9E^%^E7^%^9C^%^81^%^22^%^2C^%^22appCode^%^22:^%^22dgov-portal^%^22^%^2C^%^22organName^%^22:^%^22^%^E4^%^BA^%^91^%^E4^%^B8^%^8A^%^E8^%^B4^%^B5^%^E5^%^B7^%^9E^%^22^%^2C^%^22regionCode^%^22:^%^22520000^%^22^%^2C^%^22phone^%^22:^%^22384d53fa06a4844cfd54260b048c33e9^%^22^%^2C^%^22organCode^%^22:^%^22520002^%^22^%^2C^%^22expirationTime^%^22:37^%^2C^%^22name^%^22:^%^221342b48e6f8f39ea7ba36accc05b61a8^%^22^%^2C^%^22id^%^22:^%^229E1059C9335D4C7CB8DC7400D03AECFB^%^22^%^2C^%^22email^%^22:^%^22aa67c9bf293c42e9144476195b550c0f^%^22^%^2C^%^22username^%^22:^%^2247d57692a252657367001b6a2ff35333^%^22^%^2C^%^22status^%^22:^%^221^%^22^%^2C^%^22isWeakPwd^%^22:^%^220^%^22}; wyhtml=/tyspzy/_190c89561fd8b02_1721352151549; pwdState=true; inspurRoleKey=ROLE_AREA; windowId=0B7CA12E92004E0ABCA9EB88F0A792E4; James_cookie_sYQDUGqqzHtheme=custom',
}

params = {
    'method': 'save',
}
name=['樊文艳',
'唐维',
'杨瑛梓',
'张乙涵',
'朱玉叶',
'詹兴星',
'刘豪',
'杨祖军',
'张龙',
'孙小松',
'姚晨晨',
'符艺淋',
'雷平星',
'母永利',
'王素',
'丁塑红',
'姚仕霞',
'杨小燕',
'李航丽',
'陈宇星',
'王维维',
'吴金燕',
'贾凌云',
'王树树',
'徐晓燕',
'陈婷',
'甘志清',
'韦小燕',
'张勤',
'岺继美',
'冯杰',
'简小丽',
'丁宇杰',
'彭霞',
'王红霞 ',
'杨艳',
'岳秀梅',
'黎静',
'郑继力',
'白露',
'姚凤',
'文静',
'罗传叶',
'张洁',
'宋紫玲',
'杨满',
'李应维',
'周骥',
'刘丽春',
'石娅',
'周显东',
'陈小兰',
'张玲娇',
'赵明书',
'郭韦玮',
'李碧雨',
'喻萍',
'宋晓艳',
'毛远兰',
'汪夕人',
'黄富琴',
'赵倩',
'陈小明',
'刘畅',
'熊世君',
'张文兰',
'邹登琴',
'余小兰',
'倪雪',
'张志颖',
'陈媛',
'卢涛',
'杨静',
'李天敏',
'陆龙红',
'符迁迁',
'周泽宇',
'付娜娜',
'冯鹏博',
'赵 勋',]
for a, value in enumerate(name):
    print(a,value)

    data = 'windowId=&windowBussinessType=受理窗口&windowBussinessAuthority=1&windowShowCode=xzbsy{}&windowName=行政办事员--{}&hallName=遵义市政务中心&hallCode=16BBF0BF5FB34AAC9766BC2E878CFBCB&windowAddr=暂无&windowBussinessCode=accept&sortorder=1&windowTelPhone=&orgName=&orgCode=&windowManagerName=&windowManagerPhone=&sealCode=52030000023966&isCompositeWindow=false'.format(a,value).encode('utf8')
    data
    response = requests.post(
        'http://59.215.206.188/zhslzy/accept/system/window',
        params=params,
        cookies=cookies,
        headers=headers,
        data=data,
    ).json()
    print(response)